# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kalarmcal
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://kontact.kde.org/"
pkgdesc="The KAlarm client library"
license="LGPL-2.0-or-later"
makedepends="extra-cmake-modules kconfig-dev ki18n-dev kholidays-dev akonadi-dev kcalendarcore-dev kidentitymanagement-dev kcalutils-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kalarmcal-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # Broken

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="961ef8bbc3a41cd5f6ffdeea3bf1062730cd68e2c6b971a98d7a709a2d7a2c69b69a53ea7d4c98c553911324994bf3422e4fdd0a0e916c24a298352b4de6219f  kalarmcal-20.04.3.tar.xz"
